<?php

	class UserAction extends BaseAction {
	
		private $user;
			
		public function __construct($isSecure) {
			parent::__construct($isSecure);
			$this->service = new UserService();
			$this->user = Util::fillObject('User');
		}
	
		public function login() {
			$isLogin = isset($user->getLogin());
			$isPass = isset($user->getPassword());
			  
			$if( $isLogin && $isPass ) {
				$user = $this->service->login($user);
				if( $user == null ) {
					$this->go("login.php");
				} else {
					$this->go("index.php");
				}
			}			
		}
	}

?>